/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.viajaconmigo.repository.jpa;

import com.viajaconmigo.repository.PaisDAO;
import com.viajaconmigo.model.Pais;
import java.util.ArrayList;
import javax.inject.Named;
import javax.persistence.Query;

/**
 *
 * @author Pablo
 */

@Named
public class PaisDAOJPA extends GenericoDAOJPA<Pais> implements PaisDAO {
    
    @Override
    public ArrayList<Pais> getListaPaises() {
        Query q = em.createQuery("SELECT p FROM Pais p");
        return new ArrayList(q.getResultList());
    }

}
